from building import *
# import os

cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]             # 将当前路径加入构建搜索的头文件路径
libpath = [cwd]             # LIBPATH 指定库的路径，表示库的搜索路径是当前目录

                
libs =['arm_cortexM4lf_math.a'] # GCC 下 LIBS 指定库的名称

CPPDEFINES = ['ARM_MATH_ROUNDING']
CPPDEFINES += ['ARM_MATH_CM4']
CPPDEFINES += ['ARM_MATH_MATRIX_CHECK']
CPPDEFINES += ['ARM_MATH_DSP']
CPPDEFINES += ['RT_USING_ARM_LIBC']
 

group = DefineGroup('DSP', src, depend = [''],LIBS = libs, LIBPATH=libpath, CPPPATH = path,CPPDEFINES = CPPDEFINES)

# LIBS = LIBS, LIBPATH=LIBPATH, CPPPATH = CPPPATH 

# list = os.listdir(cwd)
# for item in list:
#     if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
#         group = group + SConscript(os.path.join(item, 'SConscript'))

Return('group')


